import 'package:contract_manager/components/custom_appbar.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'import_contract_controller.dart';

class ImportContractPage extends GetView<ImportContractController> {
  const ImportContractPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: MyAppBar(
        centerTitle: true,
        title: MyTitle('导入合同'),
        leadingType: AppBarBackType.None,
      ),
      body: Padding(
        padding: const EdgeInsets.all(16.0),
        child: Column(
          children: [
            ElevatedButton(
              onPressed: controller.importFromExcel,
              child: Text('选择Excel文件'.tr),
            ),
            const SizedBox(height: 20),
            Obx(() => Text(controller.statusMessage.value)),
          ],
        ),
      ),
    );
  }
}
